home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1996 January / macformat-033.iso / mac / Shareware City / Developers / ABox.v1.8 / Header Files / ABUEnvDragMgr.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-05-23  |  4.8 KB  |  159 lines  |  [TEXT/MMCC]

  1. /*    
  2.     Copyright © 1991-1995 by TopSoft Inc.  All rights reserved.
  3.  
  4.     You may distribute this file under the terms of the TopSoft
  5.     Artistic License, accompanying this package.
  6.     
  7.     This file was developed by George (ty) Tempel in connection with TopSoft, Inc..
  8.     See the Modification History for more details.
  9.  
  10. Product
  11.     About Box
  12.  
  13. FILE
  14.     ABUEnvDragMgr.h
  15.  
  16. NAME
  17.     ABUEnvDragMgr.h, part of the ABox project source code,
  18.     a utility class, mixed into other classes, responsible for 
  19.     handling the AboutBox DragMgr stuff.
  20.  
  21. DESCRIPTION
  22.     This file contains defines for the about box modules.
  23.     
  24. DEVELOPED BY
  25.     George (ty) Tempel                netromancr@aol.com
  26.     All code in this file, and its associated header file was
  27.     Created by George (ty) Tempel in connection with the TopSoft, Inc.
  28.     "FilterTop" application development, except where noted.
  29.  
  30. CARETAKER - George (ty) Tempel <netromancr@aol.com>
  31.      Please consult this person for any changes or suggestions to this file.
  32.  
  33. MODIFICATION HISTORY
  34.  
  35.     dd mmm yy    -    xxx    -    patchxx: description of patch
  36.     27 June 94    -    ty    -    Initial Version Created
  37.     20-july-94    -    ty    -    initial version released
  38.     28-july-94    -    ty    -    1.0.6--fixes to watch for Region errors
  39.                                 during drag process
  40.     23-may-95    -    ty    -    changes for compatibility with the CodeWarrior CW6
  41.                             release and the associated Universal Headers from Apple:
  42.                             most methods that returned references now have "Ref" at
  43.                             the end of their methods names to prevent possible collisions
  44.                             with datatypes and classes of the same name (older versions
  45.                             of the compiler didn't have a problem with this).
  46.  
  47. */
  48.  
  49. /*===========================================================================*/
  50.  
  51. /*========== Exclusion Macros ============*/
  52.  
  53. #pragma    once
  54.  
  55. #ifndef    _ABUEnvDragMgr_
  56. #define    _ABUEnvDragMgr_
  57.  
  58.  
  59. /*============ Header Files ==============*/
  60.  
  61. #include    "ABUEnv.h"
  62.  
  63. #ifndef __DRAG__
  64. #include "Drag.h"
  65. #endif
  66.  
  67. /*=========== External Linkage ===========*/
  68.  
  69. /*================ Macros ================*/
  70.  
  71. /*============== Constants ===============*/
  72.  
  73. #define        kABdefaultClippingType        'TEXT'
  74. #define        kABdefaultClippingCreator    'ttxt'
  75. #define        kABdefaultFlavorFlags        ((long)0)
  76.  
  77. /*================ Enums =================*/
  78.  
  79. /*=============== Structs ================*/
  80.  
  81. /*=============== Typedefs ===============*/
  82.  
  83.  
  84. /*=========== Class Definitions ==========*/
  85.  
  86. class    ABUEnvDragMgr : ABUEnv
  87. {
  88.     public:
  89.                                 ABUEnvDragMgr(void);
  90.         virtual                    ~ABUEnvDragMgr(void);
  91.     
  92.         virtual    Boolean            IsPresent(void);
  93.     
  94.         virtual    OSErr            Initialize(void);
  95.         virtual    OSErr            Begin(void);
  96.         virtual    OSErr            End(void);
  97.         
  98.         //    1.0.6 ty...changed to OSErr OutlineRegion()
  99.         virtual    OSErr            OutlineRegion(void);
  100.         
  101.         virtual OSErr            LocalSendProc(FlavorType theType,
  102.                                         void *dragSendRefCon,
  103.                                         ItemReference theItemRef,
  104.                                         DragReference theDragRef);
  105.  
  106.         static pascal OSErr        SendProc(FlavorType theType,
  107.                                         void *dragSendRefCon,
  108.                                         ItemReference theItemRef,
  109.                                         DragReference theDragRef);
  110.  
  111.         static    OSErr            GetDropLocationDirectory( AEDesc *dropLocation,
  112.                                                             long *directoryID,
  113.                                                             short *volumeID);
  114.                                                     
  115.         virtual    OSErr            MakeDragRegion (void);
  116.         
  117.                                 Boolean IsDragInitialized(void) const { return this->DragInitializedRef() == true; }
  118.                                 Boolean IsntDragInitialized(void) const { return ! this->IsDragInitialized(); }
  119.  
  120.                                 Boolean HasDragRef(void) const { return this->DragRef() != NULL; }
  121.                                 Boolean DoesntHaveDragRef(void) const { return ! this->HasDragRef(); }
  122.  
  123.                                 Boolean HasDragRegionRef(void) const { return this->DragRegionRef() != NULL; }
  124.                                 Boolean DoesntHaveDragRegionRef(void) const { return ! this->HasDragRegionRef(); }
  125.  
  126.                                 Boolean HasDragUPPRef(void) const { return this->DragUPPRef() != NULL; }
  127.                                 Boolean DoesntHaveDragUPPRef(void) const { return ! this->HasDragUPPRef(); }
  128.  
  129.                                 Boolean HasDragMgrEventRef(void) const { return this->DragMgrEventRef() != NULL; }
  130.                                 Boolean DoesntHaveDragMgrEventRef(void) const { return ! this->HasDragMgrEventRef(); }
  131.                                 
  132.     protected:
  133.         
  134.             Boolean                mDragInitialized;
  135.             DragReference        mDragReference;
  136.             ItemReference        mItemReference;
  137.             RgnHandle            mDragRegion;
  138.             Rect                mDragRect;
  139.             DragSendDataProc    mDragUPP;
  140.             EventRecord*        mDragMgrEvent;
  141.  
  142.             Boolean&            DragInitializedRef(void) const { return this->mDragInitialized; }
  143.             DragReference&        DragRef(void) const { return this->mDragReference; }
  144.             ItemReference&        ItemRef(void) const { return this->mItemReference; }
  145.             RgnHandle&            DragRegionRef(void) const { return this->mDragRegion; }
  146.             Rect&                DragRectRef(void) const { return this->mDragRect; }
  147.             EventRecord*&        DragMgrEventRef(void) const { return this->mDragMgrEvent; }
  148.  
  149.             DragSendDataProc&    DragUPPRef(void) const { return this->mDragUPP; }
  150.             
  151.     private:
  152.         
  153. };
  154.  
  155.  
  156. /*========== Function Prototypes =========*/
  157.  
  158.  
  159. #endif    // _ABUEnvDragMgr_